package com.southminority.ethnic.controller.document.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.southminority.ethnic.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.util.List;

/**
 * 古籍文献VO
 * 
 * @author SouthMinority
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "古籍文献视图对象")
public class DocumentVO extends BaseVO {

    @Schema(description = "文献标题", example = "水书·祭祀卷")
    private String title;

    @Schema(description = "原始标题", example = "水书·祭祀卷")
    private String originalTitle;

    @Schema(description = "作者", example = "水族传统祭司")
    private String author;

    @Schema(description = "朝代", example = "清朝")
    private String dynasty;

    @Schema(description = "年代", example = "1852")
    private Integer year;

    @Schema(description = "地区/来源地", example = "贵州省三都水族自治县")
    private String region;

    @Schema(description = "分类ID", example = "1")
    private Long categoryId;

    @Schema(description = "分类名称", example = "古籍", accessMode = Schema.AccessMode.READ_ONLY)
    private String categoryName;

    @Schema(description = "文献类型", example = "古籍")
    private String documentType;

    @Schema(description = "语言", example = "水语")
    private String language;

    @Schema(description = "文献描述", example = "水族传统祭祀仪式指导文献...")
    private String description;

    @Schema(description = "文献内容（全文或部分）")
    private String content;

    @Schema(description = "内容摘要", example = "水族传统祭祀仪式指导文献...")
    private String abstractText;

    @Schema(description = "原文内容")
    private String originalContent;

    @Schema(description = "翻译内容")
    private String translation;

    @Schema(description = "注释")
    private String annotation;

    @Schema(description = "来源", example = "贵州省三都水族自治县")
    private String source;

    @Schema(description = "收集者", example = "贵州民族大学田野调查团")
    private String collector;

    @Schema(description = "收集日期", example = "2020-03-15")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate collectionDate;

    @Schema(description = "数字化日期", example = "2021-05-20")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate digitizationDate;

    @Schema(description = "收藏机构", example = "贵州省三都水族自治县文化馆")
    private String collectionInstitution;

    @Schema(description = "文献编号/索书号", example = "SDS-SZ-001")
    private String referenceCode;

    @Schema(description = "保存状况", example = "完好")
    private String preservationStatus;

    @Schema(description = "主要文件URL（支持PDF/PPT/DOC等）", example = "http://example.com/file.pdf")
    private String primaryFileUrl;

    @Schema(description = "主要文件类型", example = "pdf")
    private String primaryFileType;

    @Schema(description = "主要文件原始名称", example = "水书祭祀卷.pdf")
    private String primaryFileName;

    @Schema(description = "主要文件大小（字节）", example = "1048576")
    private Long primaryFileSize;

    @Schema(description = "图片URLs列表")
    private List<String> imageUrls;

    @Schema(description = "PDF文件URL", example = "http://example.com/file.pdf")
    private String pdfUrl;

    @Schema(description = "音频文件URL", example = "http://example.com/audio.mp3")
    private String audioUrl;

    @Schema(description = "视频文件URL", example = "http://example.com/video.mp4")
    private String videoUrl;

    @Schema(description = "附件文件URLs（JSON格式字符串）")
    private String attachmentUrls;

    @Schema(description = "封面图片URL", example = "http://example.com/cover.jpg")
    private String coverImageUrl;

    @Schema(description = "关键词，以逗号分隔", example = "水族,祭祀,民俗,宗教")
    private String keywords;

    @Schema(description = "标签列表")
    private List<String> tags;

    @Schema(description = "浏览次数", example = "1024", accessMode = Schema.AccessMode.READ_ONLY)
    private Integer viewCount;

    @Schema(description = "下载次数", example = "128", accessMode = Schema.AccessMode.READ_ONLY)
    private Integer downloadCount;

    @Schema(description = "是否首页展示", example = "1", allowableValues = {"0", "1"})
    private Integer isFeatured;

    @Schema(description = "首页展示顺序，数字越小越靠前", example = "1")
    private Integer homepageOrder;

    @Schema(description = "排序，数字越小越靠前", example = "1")
    private Integer sortOrder;

    @Schema(description = "状态：1-已发布，0-草稿，-1-已删除", example = "1", allowableValues = {"1", "0", "-1"})
    private Integer status;

    @Schema(description = "状态描述", example = "已发布", accessMode = Schema.AccessMode.READ_ONLY)
    private String statusDesc;

    @Schema(description = "文献类型描述", example = "古籍", accessMode = Schema.AccessMode.READ_ONLY)
    private String documentTypeDesc;

    @Schema(description = "朝代描述", example = "清朝", accessMode = Schema.AccessMode.READ_ONLY)
    private String dynastyDesc;
} 